package models;

import play.db.jpa.GenericModel;
import play.db.jpa.Model;
import play.data.validation.Required;
import play.data.validation.MaxSize;

import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;


/**
 * Model DocenteComision generated by Play!
 */

@Entity

@IdClass(DocenteComisionPK.class)
@Table(name="DOCENTE_COMISION")
public class DocenteComision extends GenericModel {
	

    
    @ManyToOne
    @Id public Docente docente;
    
    @ManyToOne
    @Id public Comision comision;
    
    @Required
    public Date fechainicio;
    public Date fechafin;

    //default constructor 
    public DocenteComision() {
    }
    public DocenteComision(Docente docente,Comision comision) {
     	this.docente = docente;
     	this.comision = comision;
    }
   


}


